package logic

import (
	"context"
	"doctor-medicine-system/models/mysql"

	"doctor-medicine-system/doctorrpc/doctorrpc"
	"doctor-medicine-system/doctorrpc/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type DoctorDataListLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewDoctorDataListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DoctorDataListLogic {
	return &DoctorDataListLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// 药品信息列表
func (l *DoctorDataListLogic) DoctorDataList(in *doctorrpc.DoctorDataListRequest) (*doctorrpc.DoctorDataListResponse, error) {
	// todo: add your logic here and delete this line
	var list []*doctorrpc.DoctorDataList
	list = mysql.DoctorDataList(mysql.DB)

	return &doctorrpc.DoctorDataListResponse{
		List: list,
	}, nil
}
